package wang.aweb.childcar.model.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import wang.aweb.childcar.model.pojo.Order;
import wang.aweb.childcar.model.query.OrderParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Repository
public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    Order selectByOrderNo(String orderNo);

    List<Order> selectList(@Param("query") OrderParam orderParam);

    Integer getCount(@Param("query") Map<String, Date> query);

    Integer getAgentOrderCount(@Param("agentId") Integer agentId, @Param("starttime")Date starttime, @Param("endtime") Date endtime);

    Order findNoDoneByMemberId(Integer id);
}